package UseString.demo01;

public class TestId {
    public static void main(String[] args) {
        String id = "34082219940204628X";
        // 转化为出生年月日和性别
        String year = id.substring(6,10);
        String month = id.substring(10,12);
        String day = id.substring(12,14);
        char c = id.charAt(16);
        int sex = c - 48;
        if(sex % 2 ==0){
            System.out.println("女孩");
        }else {
            System.out.println("男孩");
        }
    }
}
